package b4.widget.user
{
	import b4.model.basic.*;
	import b4.model.player.*;
	import b4.net.*;
	import b4.widget.basic.*;
	
	import com.greensock.*;
	
	import flash.display.*;
	import flash.events.*;
	import flash.filters.*;
	import flash.geom.*;
	import flash.text.*;
	
	public class ExpBar extends BasicWidget
	{
		private var bar:MaskProgressBar;
		
		public function ExpBar()
		{
			super();
			//经验条
			var BarClass:Class = ResourceManager.getInstance().getClassByName("ExpBar");
			bar = new MaskProgressBar(BarClass);
			addChild(bar);
			//经验框
			var ExpBarFrame:Class = ResourceManager.getInstance().getClassByName("ExpBarFrame");
			addChild(new ExpBarFrame());
			var me:Me = PlayerManager.getInstance().me;
			me.packageModel.addEventListener(ModelEvent.PACKAGE_REFRESH, onRefresh);
			this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
			this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
			this.mouseChildren = false;
			this.anchor = BasicWidget.ANCHOR_RIGHT_BOTTOM;
			this.x = -710;
			this.y = -10;
			bar.percentage = 0.4;
		}
		
		private function onMouseOver(event:MouseEvent):void
		{
		}
		
		private function onMouseOut(event:MouseEvent):void
		{
		}

		private function onRefresh(event:Event):void
		{
			var me:Me = PlayerManager.getInstance().me;
		}
	}
}